<template>
  <div class="header">
      <ul>
          <li><router-link to="/detail">详情</router-link></li>
          <li><router-link to="/login">登录</router-link></li>
          <li><router-link to="/">home</router-link></li>
          <li><router-link to="/banner">banner</router-link></li>
          <li><a @click="lgout">退出</a></li>
      </ul>
  </div>
</template>

<script>
export default {
name:'Header',
methods:{
    async lgout(){
        await  this.$store.dispatch("lgout")
    }
}
}
</script>

<style>
.header{
    width: 1200px;
    height: 100px;
    margin: 0 auto;
    background-color: aqua;
}
</style>